package com.glsc.ngateway.common.base.repo.oracle.ecology;

import com.glsc.ngateway.common.base.domain.oracle.ecology.WorkFlowNodeLink;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface WorkflowNodeLinkRepository extends JpaRepository<WorkFlowNodeLink, Integer>, JpaSpecificationExecutor<WorkFlowNodeLink> {

    @Query(value = "SELECT ID, NODEID, DESTNODEID, POINTS FROM WORKFLOW_NODELINK WHERE WORKFLOWID = :workflowid and POINTS is not null", nativeQuery = true)
    List<WorkFlowNodeLink> findByWorkflowid(Integer workflowid);

}
